//
//  GFBaseNetWork.h
//  MYLC
//
//  Created by lixiao on 2016/11/2.
//  Copyright © 2016年 MR.S. All rights reserved.
//


#import <UIKit/UIKit.h>
#import <YTKNetwork/YTKRequest.h>

@interface GFBaseNetWork : YTKRequest


//get post请求
+ (GFBaseNetWork *)requestURL:(NSString*)url
               hostType:(HostStatusStyles)hostType
                   parmas:(NSDictionary*)dic
       cacheTimeInSeconds:(NSInteger)cacheTime
               requestSuccess:(SucessBlock)sucessBlock
                   requestFailed:(FailedBlock)failedBlock;

//先加载缓存后请求
+ (GFBaseNetWork *)requestFromCacheURL:(NSString *)url
                          hostType:(HostStatusStyles)hostType
                            parmas:(NSDictionary *)dic
                        requestSuccess:(SucessBlock)sucessBlock
                            requestFailed:(FailedBlock)failedBlock;

//图片上传
+ (GFBaseNetWork *)uploadImage:(NSString *)url
                  hostType:(HostStatusStyles)hostType
                   paramas:(NSDictionary *)dic
                     image:(UIImage *)image
                requestSuccess:(SucessBlock)sucessBlock
                    requestFailed:(FailedBlock)failedBlock;

//带toast的网络请求
+ (GFBaseNetWork *)requestURLWithToast:(NSString*)url
                          hostType:(HostStatusStyles)hostType
                            parmas:(NSDictionary*)dic
                cacheTimeInSeconds:(NSInteger)cacheTime
                         needToast:(BOOL)needToast
                        requestSuccess:(SucessBlock)sucessBlock
                            requestFailed:(FailedBlock)failedBlock;

@end
